﻿<Window x:Class="Gao.Poker.App.Win.SalesSummaryWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="消费汇总" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Width="800">
    <Grid Margin="10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="4*"/>
            <ColumnDefinition Width="6*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <DataGrid  Grid.Row="0" Grid.Column="0"  Margin="1" RowHeight="30" AutoGenerateColumns="False" 
                      SelectionMode="Single"  CanUserAddRows="True" CellStyle="{StaticResource Body_Content_DataGrid_Centering}"
                      AlternatingRowBackground="Gainsboro" ItemsSource="{Binding Path=Consumptions}"  SelectedItem="{Binding Path=Consumption}" AlternationCount="2"
                      FontSize="16" Height="Auto" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="会员号" Width="120" IsReadOnly="True" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=MemberCardNo}"/>
                <DataGridTextColumn Header="姓名" Width="*" IsReadOnly="True" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=MemberName}"/>
                <DataGridTextColumn Header="金额" Width="60" IsReadOnly="True" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Monetary}"/>
            </DataGrid.Columns>
        </DataGrid>

        <DataGrid  Grid.Row="1" Grid.Column="1"  Margin="1" RowHeight="30" AutoGenerateColumns="False" 
                      SelectionMode="Single"  CanUserAddRows="True" CellStyle="{StaticResource Body_Content_DataGrid_Centering}"
                      AlternatingRowBackground="Gainsboro" ItemsSource="{Binding Path=Consumption.ConsumptionPrlducts}"  AlternationCount="2"
                      FontSize="16" Height="Auto" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="编码" Width="60"  HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=BarCode}"/>
                <DataGridTextColumn Header="商品名称" Width="*" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=ProductName}"/>
                <DataGridTextColumn Header="单价" Width="60" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Price}"/>
                <DataGridTextColumn Header="购买数量" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Number}"/>
                <DataGridTextColumn Header="折扣" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Discount}"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
